import static org.junit.Assert.*;

import org.junit.Test;


public class ColaTest {
	
	// Se realizaron Pruebas de todos los metodos que tubieran que ver con las operaciones
	// de la cola en si, no con las operaciones que tubieran que ver con el resto del programa

	@Test
	public final void testAdd() {
		Cola cola = new Cola();
		cola.add(new Cliente(2, 1));
		cola.add(new Cliente(2, 1));
		assertEquals(cola.size(), 2);
	}

	@Test
	public final void testRemove() {
		Cola cola = new Cola();
		cola.add(new Cliente(2, 1));
		cola.add(new Cliente(2, 1));
		cola.add(new Cliente(2, 1));
		cola.remove();
		assertEquals(cola.size(), 2);
	}

	@Test
	public final void testClear() {
		Cola cola = new Cola();
		cola.add(new Cliente(2, 1));
		cola.add(new Cliente(2, 1));
		cola.add(new Cliente(2, 1));
		cola.clear();
		assertEquals(cola.size(), 0);
	}

	@Test
	public final void testSize() {
		Cola cola = new Cola();
		assertEquals(cola.size(), 0);	
		cola.add(new Cliente(2, 1));
		assertEquals(cola.size(), 1);	
		cola.add(new Cliente(2, 1));
		assertEquals(cola.size(), 2);	
		cola.add(new Cliente(2, 1));	
		assertEquals(cola.size(), 3);	
	}

	@Test
	public final void testIsEmpty() {
		Cola cola = new Cola();
		assertEquals(cola.isEmpty(), true);
		cola.add(new Cliente(2, 1));
		assertEquals(cola.isEmpty(), false);
		cola.add(new Cliente(2, 1));
		assertEquals(cola.isEmpty(), false);
		cola.add(new Cliente(2, 1));
		assertEquals(cola.isEmpty(), false);
		cola.clear();
		assertEquals(cola.isEmpty(), true);
	}

	@Test
	public final void testPeek() {
		Cola cola = new Cola();
		cola.add(new Cliente(2, 1));
		cola.add(new Cliente(2, 1));
		assertEquals(cola.peek().getT1(), 2);
		cola.peek();
		assertEquals(cola.size(), 2);		
	}

}
